<?php
/**
 * <class description>
 *
 * @author Matias Mirabelli <project@moyrax.com>
 *
 * @package Kingorm
 */
class QueryFactory
{
	/******Singleton******/

	private static $instance = null;

	public static function getInstance()
	{
		if ( self::$instance == null ) {
			self::$instance = new QueryFactory();
		}

		return( self::$instance );
	}
	/*********************/

	private $configMapping = array();

	public function addConfigMapping( MappingController $configMapping )
	{
		$this->configMapping[ $configMapping->mappingName ] = $configMapping;
	}

	public function getConfigMapping( $mappingName )
	{
		return( $this->configMapping[ $configMapping->mappingName ] );
	}

	public function makeSelectQuery( $mappingName, $statementName )
	{
		$mapping = $this->getConfigMapping( $mappingName );

		$selects   = $mapping->mappings->getSectionValues( "operations", "select" );
		$requested = $this->getValueById( $selects, $statementName );


	}
}
?>
